/*
 * @Author: your name
 * @Date: 2022-03-02 14:06:55
 * @LastEditTime: 2022-03-02 14:10:12
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \JS\day04\2-对象访问.js
 */
var obj={
    weight:56,
    height:180,
    name:'zhangshan',
    sayName:function(){
        console.log('my name is ',this.name)
    }
}
//1.点访问
console.log(obj.name);
console.log(obj.gender);  //undefined
//2.中括号访问
var name ='huahua'
console.log(obj['name']);
